package com.xiaoxing.salesclient.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.xiaoxing.salesclient.mvp.contract.ZhuYiShiXiangContract;
import com.xiaoxing.salesclient.mvp.model.ZhuYiShiXiangModel;


@Module
public class ZhuYiShiXiangModule {
    private ZhuYiShiXiangContract.View view;

    /**
     * 构建ZhuYiShiXiangModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ZhuYiShiXiangModule(ZhuYiShiXiangContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ZhuYiShiXiangContract.View provideZhuYiShiXiangView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ZhuYiShiXiangContract.Model provideZhuYiShiXiangModel(ZhuYiShiXiangModel model) {
        return model;
    }
}